package service.impl;
 import dao.StudentDao;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import pojo.Student;
 import service.StudentService;
 
 import java.util.List;
 @Service("studentService")
 public class StudentServiceImpl implements StudentService {
     @Autowired
     private StudentDao studentDao;


     @Override
     public int addStudent(Student student) {
         return studentDao.addStudent(student);
     }

     @Override
     public Student findStudentById(int id) {
         return studentDao.findStudentById(id);
     }

     @Override
     public int updateStudent(Student student) {
         return studentDao.updateStudent(student);
     }

     @Override
     public int deleteStudentById(Integer id) {
         return studentDao.deleteStudentById(id);
     }

     @Override
     public List<Student> findAll(Student student, int offser, int pageSize) {
         List<Student> students = studentDao.findAll(student, offser, pageSize);
         return students;

     }

     @Override
     public int count(Student student) {
         return studentDao.count(student);
     }



 }
